#ifndef _allocator_h_
#define _allocator_h_

#include "memory.h"

class CMsgAllocator:public CMemory
{
public:
	CMsgAllocator();

	~CMsgAllocator();

	virtual void		Create();

	struct msg*			alloc_sized_msg(unsigned int size);

private:

	void				adjust(unsigned int require_size);

private:

	struct block*		ptr_block;
	int					alloc_pos;
};

extern CMsgAllocator* theAllocator;

#endif